import logo from './logo.svg';
import './App.less';
import { Button } from 'antd';
import {BrowserRouter as Router, Link, Route, Switch} from "react-router-dom";
import Main from "./pages/Main";
import Page1 from "./pages/Page1";
import Page2 from "./pages/Page2";
import Scada from "./pages/scada"
import ScadaPage3 from "./pages/Page3"
import React from "react";



function App() {
  return (
      <Router>
          <div>
              <ul>
                  <li>
                      <Link to="/">Main</Link>
                  </li>
                  <li>
                      <Link to="/page1">page1</Link>
                  </li>
                  <li>
                      <Link to="/page2">page2</Link>
                  </li>
                  <li>
                      <Link to="/scada">scada</Link>
                  </li>
                  <li>
                      <Link to="/web/alarmview/allAlarmView.html">allAlarmView</Link>
                  </li>
              </ul>

              <hr />

              {/*
          A <Switch> looks through all its children <Route>
          elements and renders the first one whose path
          matches the current URL. Use a <Switch> any time
          you have multiple routes, but you want only one
          of them to render at a time
        */}
              <Switch>
                  <Route exact path="/" component={Main}>
                  </Route>
                  <Route path="/page1" component={Page1}>
                  </Route>
                  <Route path="/page2" component={Page2}>
                  </Route>

                  <Route path="/scada" component={Scada}>
                  </Route>

                  <Route path="/web/alarmview/allAlarmView.html" component={ScadaPage3}>
                  </Route>

              </Switch>
          </div>
      </Router>
  );
}

export default App;
